#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>

int main() {
    int fd = open("a.txt", O_RDWR | O_CREAT, 0666);
    if (fd == -1) {
        perror("open");
        return 1;
    }
    off_t oldpos = lseek(fd, strlen("abcdefghijklm1"), SEEK_SET);
    if (oldpos != -1) {
        int result = write(fd, "uu", strlen("uu"));
        if (result == -1)
            printf("write error\n");
    } else
        printf("seek error");
    close(fd);
    return 0;
}


